package com.shketai.service;

import java.util.List;

import com.shketai.dao.SubjectDao;
import com.shketai.entity.Subject;

public class SubjectService {

	private SubjectDao subjectDao;

	public void setSubjectDao(SubjectDao subjectDao) {
		this.subjectDao = subjectDao;
	}
	
	public int add(Subject subject,int major_id){
		int result = subjectDao.add(subject, major_id);
		return result;
	}
	
	public int update(Subject subject){
		int result = subjectDao.update(subject);
		return result;
	}
	
	public int delete(Subject subject){
		int result = subjectDao.delete(subject);
		return result;		
	}
	
	public List<Subject> findAll(){
		List list = subjectDao.findAll();
		return list;
	}
	
	public List<Subject> findAll1(int major_id){
		List list = subjectDao.findAll1(major_id);
		return list;
	}
}
